<template>
  <div id="qiankunChild">
    <el-menu :router="true" :default-active="prefix+'/'" class="el-menu-demo" mode="horizontal"
             background-color="#545c64" text-color="#fff" active-text-color="#ffd04b" @select="handleSelect">
      <el-menu-item :index="prefix + '/'">处理中心</el-menu-item>
      <el-menu-item :index="prefix + '/myAbout'">订单管理</el-menu-item>
    </el-menu>
    <div>
      <!-- 路由出口 -->
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
export default {
  name: 'App',
  data(){
    return{
      prefix:window.__POWERED_BY_QIANKUN__== true?'/qiankunChild':'',
      activeIndex2:this.prefix + '/',
    }
  },
  methods:{
    handleSelect(key, keyPath) {
      console.log(key, keyPath);
    }
  }
}
</script>

<style>
html,body{
  margin: 0 !important;
  padding: 0 !important;
}
#mainContainer {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  background: salmon;
}
</style>
